<?php
namespace app\admin\model;

use think\Model;

class Permission extends Model
{
    public function getCNameFM($method)
    {
        return $this->where('method', $method)->value('name');
    }

    public function getANameFM($amethod, $cmethod)
    {
        $id = $this->where('method', $cmethod)->value('id');
        
        return $this->where('pid', $id)->where('method', $amethod)->value('name');
    }
}
